function run() {
	try {
		setUp();
		execute();
		show();
		verify();
		tearDown();
	} catch(e) {
		log("----------Exception----------");
		log(e);
		log(e.stack);
		log("----------Exception----------\n\n");
		throw e;
	}
}

function setUp() {
	tearDown();
}

function show() {
	log("Test Name: " + name() + "\n");

	if (context.result !== undefined) {
		log("result: " + context.result + "\n");
	}

	if (context.elems) {
		log("-----------elems[length:" + context.elems.length + "]------\n");
		for (var i = 0, l = context.elems.length; i < l; ++i) {			
			log("--------------" + (i + 1) + "--------------");
			log(panda.outerHtml(context.elems[i]));
			log("--------------" + (i + 1) + "--------------\n");
		}
		log("--------------elems--------------\n");
	}

	if (context.html) {
		log("--------------html--------------");
		log(context.html);
		log("--------------html--------------\n");
	}

	log();
}

function tearDown() {
	context = {};
}

function log(s) {
	s === undefined ?
		java.lang.System.out.println() :
		java.lang.System.out.println(s);
}
